Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@a-wallen
Copy link
Contributor

@a-wallen a-wallen commented Dec 21, 2022

Removes FlutterView to support multi-window.

Fixes flutter/flutter#112204

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@a-wallen a-wallen force-pushed the refactor_fl_view branch 2 times, most recently from c8592e2 to e54d32d Compare December 22, 2022 17:50
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, this is still a draft, just some fly-by comments.

set onPlatformConfigurationChanged(VoidCallback? callback);

Iterable<FlutterView> get views;
Map<Object, FlutterView> get views;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't expose this as a Map. Maps are mutable and we don't want the framework/apps to be able to mutate this object. It's also an (unnecessary) API break.

We have however talked about exposing a new method, something like getViewById that allows you to, well, get a view by passing in an ID without exposing the entire Maps interface.

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Dec 22, 2022
@a-wallen a-wallen marked this pull request as ready for review December 22, 2022 22:20
@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #38453 at sha b3fed4a

@a-wallen a-wallen marked this pull request as draft December 22, 2022 23:02
@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

@a-wallen a-wallen marked this pull request as ready for review January 3, 2023 18:46
const ViewConfiguration({
this.view,
@Deprecated('''
Renaming window to view since `FlutterWindow` has been removed from dart::ui.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I don't understand this deprecation message. It should be something actionable in the form of "Use xxxx instead." For example, "Use the view argument instead. The window argument has been renamed to view."
  2. If it's a rename, shouldn't we point them to the same value? The two parameter should be exclusive (assert that only one of them is non-null) and be assigned to the same field (_view) and both getter should return this field.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you're right 👍

Copy link
Contributor Author

@a-wallen a-wallen Jan 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about

      `FlutterWindow` has been removed from dart::ui, and the window property is no longer semantically sound
       use the `view` property instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion the explanation is unnecessary here. Just tell the user how to change it. If you really want to explain it, add a link to the design doc, or to this PR with an expanded paragraph of description.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reopening as I don't think the second part was addressed:

If it's a rename, shouldn't we point them to the same value? The two parameter should be exclusive (assert that only one of them is non-null) and be assigned to the same field (_view) and both getter should return this field.

@ditman
Copy link
Member

ditman commented Jan 10, 2023

🎉 just saw the notification that this landed. Kudos!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App needs tests platform-web Code specifically for the web engine will affect goldens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor FlutterView / FlutterWindow

10 participants